package stdio.costa.imoca.exception;

public class MocaUserValidationException extends RuntimeException {

	private static final long serialVersionUID = 1156466181493957249L;

	private String errorCode;

	public MocaUserValidationException() {
	}

	public MocaUserValidationException(String errorCode, String message) {
		super(message);
		this.errorCode = errorCode;
	}

	public MocaUserValidationException(String errorCode, String message,
			Throwable cause) {
		super(message, cause);
		this.errorCode = errorCode;
	}

	public String getErrorCode() {
		return errorCode;
	}

	@Override
	public String toString() {
		StringBuilder buffer = new StringBuilder();
		buffer.append(this.getClass().getName()).append("[");
		buffer.append("errorCode=").append(errorCode);
		buffer.append(", message=").append(getMessage());
		buffer.append("]");
		return buffer.toString();
	}
}
